using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class LoadPanel : Singleton<LoadPanel>
{


    public float delay_time = 0.25f;
    public void Activate()
    {
        this.gameObject.SetActive(true);
        this.GetComponent<CanvasGroup>().alpha = 0;
        this.GetComponent<CanvasGroup>().DOFade(1, delay_time);
        
    }
    public void DeActivate()
    {
        var s=DOTween.Sequence();
        s.Append(this.GetComponent<CanvasGroup>().DOFade(0, delay_time));
        s.AppendCallback(() =>
        {
            this.gameObject.SetActive(false);
        });

    }

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
